<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <!-- Title -->
    <title>博客|呵哈糊涂</title>
    <meta name="description" content="Python&flask&coder&呵哈糊涂博客"/>
    <meta name="site" content="http://www.htblog.cc"/>


    <!-- =================================================
        ***Favicon***
    ==================================================== -->

    <link rel="shortcut icon" type="image/png" href="/blogobj/images/home/code1.jpg">

    <!-- =================================================
        ***Main CSS File***
    ==================================================== -->


    <link href="/blogobj/style.css" rel="stylesheet" type="text/css">

    <!-- share.css -->
    <link rel="stylesheet" href="/share/dist/css/share.min.css">
    {#    <script src="//cdn.bootcss.com/jquery-validate/1.15.1/jquery.validate.min.js"></script>#}
    {#    <script src="//cdn.bootcss.com/jquery-validate/1.15.1/additional-methods.min.js"></script>#}

    {% block styles %}

    {% endblock %}

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<div id="preloader">
    <div class="preloader_spinner"></div>
</div>
<!-- preloader end -->
<div class="blog_left1_page_page blog_page">
    <!-- ==========================================================
        1.*Header_Area start
    ============================================================ -->
    <header id="header-3" class="header">
        <div class="container">
            <div class="row">
                <div class="col-sm-2">
                    <div class="logo">
                        <a href="index-2.html"><img src="/blogobj/images/home/logo.png" alt="logo"></a>
                    </div>
                </div><!-- column End -->
                <div class="col-sm-10">
                    <nav class="header-nav">
                        <div class="search-button">
                            <a href="#" class="search-toggle" data-selector="#header-3"></a>
                        </div><!-- Search-button End -->
                        <div class="mainmenu">
                            <ul>
                                <li class="current"><a href="{{ url_for('blog.blog_index') }}" data-hover="Home">首页</a>
                                </li>
                                <li><a href="{{ url_for('error') }}" data-hover="About">关于</a></li>
                                <li><a href="" data-hover="service">我的简历</a>
                                    <ul class="sub-menu">
                                        <li><a href="#sendMsg">向我发消息</a></li>
                                        <li><a href="{{ url_for('my_info.my_detail') }}">查看更多</a></li>
                                    </ul>
                                </li>

                                <li><a href="#" data-hover="blog">博客</a>
                                    <ul class="sub-menu">
                                        <li><a href="{{ url_for('blog.blog_index') }}">博客首页</a></li>
                                        <li><a href="{{ url_for('blog.blog_index') }}">热点内容</a></li>
                                        <li><a href="{{ url_for('blog.blog_post') }}">发布博客</a></li>

                                    </ul>
                                </li>
                                <li><a href="{{ url_for('admin.edit_user') }}" data-hover="pages">用户：<span
                                        class="label label-success">{{ session['admin'] if session['admin'] else '游客' }}</span>
                                </a>
                                    <ul class="sub-menu">
                                        <li><a href="{{ url_for('manage.blog_list') }}">管理</a></li>
                                        <li><a href="{{ url_for('admin.login') }}">登录</a></li>
                                        <li><a href="{{ url_for('admin.logout') }}">退出</a></li>

                                    </ul>
                                </li>
                                <li><a href="{{ url_for('my_info.my_detail') }}" data-hover="Contact">联系我^~^</a></li>
                            </ul>
                        </div><!-- Mainmenu End -->
                        <form action="#" class="search-box">
                            <input type="text" class="text search-input" placeholder="输入要搜索的内容..."/>
                        </form><!-- Search-Box End -->
                    </nav>
                </div><!-- column End -->
            </div><!-- row end -->
        </div><!-- Container end -->
    </header><!-- Header end -->
    <!-- ==========================================================
        2.*Header_top_Area start
    ============================================================ -->
    <div class="header_top_area">
        <div class="container">
            <div class="row">
                <div class="col-md-6 col-sm-7">
                    <div class="header_top_left">
                        <a href="#"><i class="fa fa-envelope"></i>1711621009@qq.com</a>
                        {#                        <a href="#"><i class="fa fa-phone"></i>+11 222-333-444</a>#}
                    </div>
                </div><!-- column End -->
                <div class="col-md-6 col-sm-5">
                    <div class="header_top_right">
                        <span>语言 :</span>
                        <ul class="lang">
                            <li data-code="en">english</li>

                        </ul>
                        <div class="language_option"><span class="">中文</span><i class="icofont icofont-caret-down"></i>
                        </div>
                    </div>
                </div><!-- column End -->
            </div><!-- row End -->
        </div><!-- Container End -->
    </div>
    <!-- ==================================================
        3.*ALL_page banner area start
    =================================================== -->
    {% block blog_header %}

    {% endblock %}

    <!-- ==================================================
        4.*Single_Service_page banner area start
    =================================================== -->
    <div class="blog_page_area section_padding">
        <div class="container">
            <div class="row">
                <div class="col-md-3 col-sm-4">
                    <aside>
                        <div class="widget widget_search">
                            <form action="#">
                                <input id="blogSearch" class="blogSearch" type="text" placeholder="搜索博客..."
                                       name="blogSearch">
                                <a id="btnsearch">
                                    <i class="icofont icofont-search-alt-2"></i>
                                </a>
                            </form>
                        </div>
                        <div>
                            <select class="text-xs" name="category" id="category">
                                <option value="0">--选择分类--</option>

                            </select>
                        </div>
                    </aside>
                    <!-- aside End -->
                    <aside>
                        <div class="widget sidebar_one common_after category">
                            <h3>搜索结果</h3>
                            <ul id="searchList">
                                <li><i class="fa fa-pagelines"></i><a href="#">暂无内容</a></li>
                            </ul>
                        </div>
                    </aside>

                    <aside>
                        <div class="widget sidebar_one common_after category">
                            <h3>分类</h3>
                            <ul>
                                {% for cate in cates %}
                                    <li><i class="icofont icofont-caret-right"></i><a
                                            href="{{ url_for('.category_page',id=cate.id) }}">{{ cate.categoryname }}<span
                                            class=" label label-primary" id="cate{{ cate.id }}"></span></a></li>
                                {% endfor %}
                            </ul>
                        </div>
                    </aside>
                    <!-- aside End -->
                    <aside class="widget recent_post common_after">
                        <h3>最新发表</h3>

                        {% for art in newart %}
                            <div class="single_recent_post">
                                <div class="single_recent_img">
                                    <img src="/blogobj/images/pages/post1.png" alt="图标" width="80px" height="80px">
                                </div>
                                <div class="single_recent_text">
                                    <h4><a href="{{ url_for('blog.blog_detail', id=art.id) }}">{{ art.title }}</a></h4>
                                    <h5>{{ art.releasetime.strftime('%Y-%m-%d') }}</h5>
                                </div>
                            </div>
                        {% endfor %}
                        <!-- single_recent_post End -->

                    </aside>
                    <!-- aside End -->
                    <aside>
                        <div class="widget sidebar_two tag_widget common_after">
                            <h3>收藏标签</h3>
                            <ul>
                                <li><a target="_blank" href="http://bangumi.bilibili.com/anime/1733"><i
                                        class="fa fa-file-movie-o"></i> 罗小黑战记</a></li>
                                <li><a target="_blank" href="http://bangumi.bilibili.com/anime/5352"><i
                                        class="fa fa-file-movie-o"></i> 不良人2</a></li>
                                <li><a target="_blank"
                                       href="http://v.youku.com/v_show/id_XMTgyMzMwNTM3Mg==.html?spm=a2h0j.8191423.item_XMTgyMzMwNTM3Mg==.A"><i
                                        class="fa fa-file-movie-o"></i> 秦时明月之君临天下</a></li>
                                <li><a target="_blank"
                                       href="http://v.youku.com/v_show/id_XMTgzMTk0MjIxMg==.html?spm=a2h0j.8191423.item_XMTgzMTk0MjIxMg==.A"><i
                                        class="fa fa-file-movie-o"></i> 天行九歌</a></li>
                                <li><a href="#">flask</a></li>
                                <li><a href="#">常用模板</a></li>
                                <li><a href="#">jquery</a></li>
                                <li><a href="#">bootstrap</a></li>
                                {#                            <li><a href="#">quate</a></li>#}
                            </ul>
                        </div>
                    </aside>
                    <!-- aside End -->
                    <aside>
                        <div class="widget  sidebar_one common_after category">
                            <h3><i class="fa fa-info-circle"></i></h3>
                            <ul>
                                <li id="dateinfo" style="background-color: #aaaaaa; color: #2f9f67">今天是： <span class="label label-info" id="weekday"></span></li>
                                <li ><div  id="lunar">农历：</div>|---------<div id="animal">属</div></li>
                                <li ><div  id="suit">适合 </div><div id="avoid">不适合 </div></li>
                                <li id="lunaryear"></li>
                            </ul>
                        </div>
                    </aside>
                </div>
                <!-- column End -->
                {% block main_content %}

                {% endblock %}
                <!-- column End -->
            </div>
            <!-- row End -->
        </div>
        <!-- container End -->
    </div>
    <!-- ==================================================
        5.*Footer_area start
    ===================================================== -->
    <footer class="footer">
        <div class="footer_top_area footer_top clearfix">
            <div class="container">
                <div class="row ">
                    <div class="col-sm-3 col-sm-offset-1col-xs-12">
                        <div class="widget widget_text">
                            <div class="footer_logo">
                                <a href="index-2.html"><img src="/blogobj/images/home/footer_logo.png"
                                                            alt="footer logo"></a>
                            </div>
                            <p>乐观的人和骄傲的人都是善良的，KIND CODER...</p>
                        </div>
                    </div><!-- column end -->
                    <div class="col-sm-2 col-xs-6">
                        <div class="widget footer_top_menu">
                            <h2>友情链接</h2>
                            <ul>
                                <li><a target="_blank" href="http://www.google.com">Google</a></li>
                                <li><a target="_blank" href="http://www.bootcss.com/">Bootstrap中文网</a></li>
                                <li><a target="_blank" href="http://www.github.com/">Github</a></li>
                            </ul>
                        </div>
                    </div><!-- column end -->
                    <div class="col-sm-2 col-xs-6">
                        <div class="widget footer_top_menu margin_top_tablet">
                            <h2>快速导航</h2>
                            <ul>
                                <li><a target="_blank" href="#">博客</a></li>
                                <li><a target="_blank" href="#">博客分类</a></li>
                                <li><a target="_blank" href="#">我的简介</a></li>
                            </ul>
                        </div>
                    </div><!-- column end -->
                    {#                <div class="col-sm-2  col-xs-6">#}
                    {#                    <div class="widget footer_top_menu margin_top_tablet margin-left-30">#}
                    {#                        <h2>Quick Link</h2>#}
                    {#                        <ul>#}
                    {#                            <li><a href="#">home</a></li>#}
                    {#                            <li><a href="#">about</a></li>#}
                    {#                            <li><a href="#">service</a></li>#}
                    {#                        </ul>#}
                    {#                    </div>#}
                    {#                </div><!-- column end -->#}
                    <div class="col-sm-2 col-xs-6">
                        <div class="widget footer_top_menu margin_top_tablet margin-left-30">
                            <h2>分享给朋友</h2>
                            <ul>
                                <div class="social-share" data-initialized="true">
                                    <a href="#" class="social-share-icon icon-weibo"></a>
                                    <a href="#" class="social-share-icon icon-qq"></a>
                                    <a href="#" class="social-share-icon icon-wechat"></a>
                                    <a href="#" class="social-share-icon icon-qzone"></a>
                                    <a href="#" class="social-share-icon icon-douban"></a>
                                </div>
                            </ul>
                        </div>

                    </div><!-- column end -->
                </div><!-- row end -->
            </div><!-- container end -->
        </div><!-- Footer_Top_area end -->
        <div class="footer_bottom_area">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <div class="footer_bottom text-center">
                            <p>Copyright <span>&copy;</span>呵哈糊涂 2016, 版权所有 .</p>
                        </div>
                    </div><!-- column end -->
                </div><!-- row end -->
            </div><!-- container end -->
        </div><!-- Footer_bottom_area end -->
    </footer>
    <!-- ======================================================
        ***Js Files***
    =========================================================== -->
    <script src="/blogobj/js/jquery-3.1.0.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script type="text/javascript" src="/xheditor-1.2.2/xheditor-1.2.2.min.js"></script>
    <script type="text/javascript" src="/xheditor-1.2.2/xheditor_lang/zh-cn.js"></script>


    <!-- ================= Main Js ==================== -->

    <!-- ================= Bootstrap min Js =========== -->
    <script src="/blogobj/js/bootstrap.min.js"></script>

    <!-- ================= owl carousel min Js ======== -->
    <script src="/blogobj/js/owl.carousel.min.js"></script>

    <!-- ================= Meanmenu Js ================ -->
    <script src="/blogobj/js/jquery.meanmenu.js"></script>

    <!-- ================= Easing  Js ================= -->
    <script src="/blogobj/js/jquery.easing.1.3.js"></script>

    <!-- ================= Active Js ================== -->
    <script src="/blogobj/js/active.js"></script>

    <!-- ================= share ================== -->
    <script src="/share/dist/js/social-share.min.js"></script>

</div>

</body>
{% block scripts %}

{% endblock %}

<script>
    var $config = {
        url: '', // 网址，默认使用 window.location.href
        source: '', // 来源（QQ空间会用到）, 默认读取head标签：<meta name="site" content="http://overtrue" />
        title: '', // 标题，默认读取 document.title 或者 <meta name="title" content="share.js" />
        description: '', // 描述, 默认读取head标签：<meta name="description" content="PHP弱类型的实现原理分析" />
        image: '', // 图片, 默认取网页中第一个img标签
        sites: ['qzone', 'qq', 'weibo', 'wechat', 'douban'], // 启用的站点
        disabled: ['google', 'facebook', 'twitter'], // 禁用的站点
        wechatQrcodeTitle: "微信扫一扫：分享", // 微信二维码提示文字
        wechatQrcodeHelper: '<p>微信里点“发现”，扫一下</p><p>二维码便可将本文分享至朋友圈。</p>'
    };
    {#    $('.social-share').share($config);#}
</script>
</html>
<script>
    $(document).ready(function () {
        $.ajax({
            url: '{{ url_for('.category_blog') }}',
            method: 'GET',
            datatype: 'json',
            success: function (cates) {
                $.each(cates, function (i, item) {
                    $("#category").append('<option value="' + item.id + '">' + item.categoryname + '</option>')
                });
            }
        });
        $("#btnsearch").click(function () {
            var id = document.getElementById('category').value;
            var name = document.getElementById('blogSearch').value;
            $("#searchList").empty();
            $.ajax({
                url: '{{ url_for('blog.blog_search') }}',
                method: 'GET',
                datatype: 'json',
                data: {id: id, name: name},
                success: function (art) {
                    $.each(art, function (i, item) {
                        $("#searchList").append('<li><i class="fa fa-pagelines"></i><a href="/blog/page/' + item.id + '">' + item.title + '</a><span>时间：' + item.releasetime + '</span></li>');

                    });
                }
            });
        });
        $.ajax({
            url: '{{ url_for('.num_category') }}',
            method: 'GET',
            datatype: 'json',
            success: function (nums) {
                $.each(nums, function (i, item) {
                    switch (item.categoryid) {
                        case 1:
                            $("#cate1").append(item.num);
                            break;
                        case 2:
                            $("#cate2").append(item.num);
                            break;
                        case 3:
                            $("#cate3").append(item.num);
                            break;
                        case 4:
                            $("#cate4").append(item.num);
                            break;
                        case 5:
                            $("#cate5").append(item.num);
                            break;
                    }
                });
            }
        });
    });
</script>

<script>
   <!-- ================= 日期信息 ================== -->
    $(document).ready(function () {
        $.ajax({
            url: '{{ url_for('blog.get_date') }}',
            method: 'GET',
            datatype: 'json',
            success: function (date) {
                    $("#dateinfo").append(date.date);
                    $("#weekday").append(date.weekday);
                    $("#lunar").append(date.lunar);
                    $("#animal").append(date.animalsYear);
                    $("#suit").append(date.suit);
                    $("#avoid").append(date.avoid);
                    $("#lunaryear").append(date.lunarYear)
            }
        });
    });
</script>